---
title: OpenAI
sidebarTitle: OpenAI
---

import Overview from "/snippets/overview.mdx"
import PreBuiltTooling from "/snippets/generated/openai/PreBuiltTooling.mdx"
import PreBuiltUseCases from "/snippets/generated/openai/PreBuiltUseCases.mdx"

import { StatusWidget } from "/snippets/api-down-watch/status-widget.jsx"

<StatusWidget service="openai" />

<Overview />
<PreBuiltTooling />
<PreBuiltUseCases />

## Access requirements
| Pre-Requisites | Status | Comment|
| - | - | - |
| Paid dev account | ❓ |  |
| Paid test account | ❓ |  |
| Partnership | ❓ | |
| App review | ❓ |  |
| Security audit | ❓ | |


## Setup guide

_No setup guide yet._

<Tip>Need help getting started? Get help in the [community](https://nango.dev/slack).</Tip>

<Note>Contribute improvements to the setup guide by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/openai.mdx)</Note>


## Useful links

-   [Generate an API key in your OpenAI account](https://platform.openai.com/api-keys)
-   [OpenAI API docs](https://platform.openai.com/docs/api-reference/introduction)
-   [OpenAI Authentication](https://platform.openai.com/docs/api-reference/authentication)
-   [OpenAI rate limits](https://platform.openai.com/docs/guides/rate-limits)

<Note>Contribute useful links by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/openai.mdx)</Note>

## API gotchas

- OpenAI uses API_KEY auth mode with `Authorization: Bearer API_KEY` in the request header to access different endpoints.
- Nango supports automatic retries based on the `x-ratelimit-reset-requests` header from OpenAI's API. This header indicates when the request limit will reset, allowing Nango to efficiently manage API calls. Unlike `x-ratelimit-reset-tokens`, which pertains to the total token usage,`x-ratelimit-reset-requests` specifically addresses the number of API requests.
- For users associated with multiple organizations or accessing their projects via a legacy user API key, optional headers can be included to specify the organization and project for the API request. Organization IDs can be found on your [Organization settings](https://platform.openai.com/account/organization) page, while project IDs can be found on your [General settings](https://platform.openai.com/settings) page.
- This can be done at the script level:
```js
const config:ProxyConfiguration = {
    endpoint: '/v1/models',
    headers: {
        'OpenAI-Organization': $organizationId,
        'OpenAI-Project': $projectId
    }
};
```

<Note>Contribute API gotchas by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/openai.mdx)</Note>

## Going further

<Card title="Connect to Openai" icon="link" href="/integrations/all/openai/connect" horizontal>
  Guide to connect to Openai using Nango Connect.
</Card>
